import java.util.Scanner;
public class exp {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int co = 3;
		for (int i = 0; i < co; i++) {
			String str = scan.nextLine();
			if (str.equals("123456")) {
				System.out.println("密码正确，登录成功！！！");
				break;
			} else {
				System.out.println("登录失败！！！");
				System.out.println("还有" +  (3 - 1 - i)+ "次机会！！！");
			}
		}
	}
	public static void main12(String[] args) {
		for (int i = 0; i < 1000000; i++) {
			int co = 0;
			int tmp = i;
			while (tmp != 0) {
				co++;
				tmp /= 10;
			}

			int sum = 0;
			tmp = i;
			for (int j = 0; j < co; j++) {
				sum += Math.pow(tmp % 10, co);
				tmp /= 10;
			}
			if (sum == i) {
				System.out.println(i);
			}
		}
	}
	public static void main11(String[] args) {
		int co = 0;
		for (int i = 0; i <= 100; i++) {
			int tmp = i;
			while (tmp != 0) {
				if (tmp % 10 == 9) {
					co++;
				}
				tmp /= 10;
			}
		}
		System.out.println(co);
	}
	public static void main10(String[] args) {
		double sum = 0;
		double tmp = 1;
		for (int i = 1; i <= 100; i++) {
			sum += 1.0 / tmp;
			tmp = -tmp + (tmp % 2 == 0 ? 1 : -1);
		}
		System.out.println(sum);
	}
	public static void main9(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		while (a % b != 0) {
			int tmp = a % b;
			a = b;
			b = tmp;
		}
		System.out.println("最大公约数： " + b);
	}
	public static void main8(String[] args) {
		for (int i = 1; i <= 9; i++) {
			for (int j = 1; j <= i; j++) {
				System.out.print(j + " * " + i + " = " + i * j + "  ");
			}
			System.out.println();
		}
	}
	public static void main7(String[] args) {
		for (int i = 1; i <= 100; i++)
		{
			int j = 2;
			for (; j <= (int)Math.sqrt(i); j++){
				if (i % j == 0)
				{
					break;
				}
			}
			if (j > (int)Math.sqrt(i))
			{
				System.out.println(i + "是素数");
			}
		}
	}
	public static void main6(String[] args) {
		Scanner scan = new Scanner(System.in);
		while (true)
		{
			int year = scan.nextInt();
			if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
			{
				System.out.println("瑞年");
			}
			else
			{
				System.out.println("平年");
			}
		}

	}
	public static void main5(String[] args) {
		int a = 10;
		int b = 20;
		System.out.println("a:" + a + "\nb:" + b);
		int tmp = a;
		a = b;
		b = tmp;
		System.out.println("a:" + a + "\nb:" + b);

	}
	public static void main4(String[] args) {
		int a = Integer.MAX_VALUE + 1;
		//byte b = (long)10;
		System.out.println(a); 
		//System.out.println(b);

		byte i = 9 + 1;
		System.out.println(i);
	}
	public static void main3(String[] args) {
		float a = 1.1f;
		System.out.println(a * a);
	}
	public static void main2(String[] args) {
		for (int i = 0; i < args.length; i++)
		{
			System.out.println(args[i]);
		}
	}
	public static void main1(String[] args) {
		System.out.println("最大值：" + Long.MAX_VALUE);
		System.out.println("最小值：" + Long.MIN_VALUE);
		int a = 10;
		int b = 20;
		System.out.println(a + b + "hhh");
	}
}